﻿<!DOCTYPE html>
<html>
	<head>
		<title>Maze</title>
		<link rel="stylesheet" href="maze.css" />
        <script src="jquery-1.10.2.min.js"></script>
		<script src="maze.js"></script>
        <script>
            $(document).ready(function () {
                var maze = new Maze(10, 10);
                function drawMaze() {
                    maze = new Maze(10, 10);
                    maze.create(0, 0);
                    $("#maze").html(maze.generate());
                }
                function solveMaze() {
                    maze.findPath(0, 0);
                    $("#maze").html(maze.generate());
                }
                $("#gen").click(drawMaze);
                $("#sol").click(solveMaze);
            });
        </script>
	</head>
	<body>
        <div id="maze"></div>
        <button id="gen">Gen</button>
        <button id="sol">Solve</button>
	</body>
</html>